package net.neimeng.luculent.dependencies.getui;

import android.content.Context;

import com.igexin.sdk.GTIntentService;
import com.igexin.sdk.message.GTCmdMessage;
import com.igexin.sdk.message.GTNotificationMessage;
import com.igexin.sdk.message.GTTransmitMessage;

/**
 * Created by jingwenguang on 2018/3/23.
 */

public class GeTuiIntentService extends GTIntentService {

    @Override
    public void onReceiveServicePid(Context context, int i) {
        System.out.println("=============onReceiveServicePid");
    }

    /**
     *  接收 cid
     * @param context
     * @param s
     */
    @Override
    public void onReceiveClientId(Context context, String s) {
        System.out.println("============="+s);
    }

    /**
     * 处理透传消息
     * @param context
     * @param gtTransmitMessage
     */
    @Override
    public void onReceiveMessageData(Context context, GTTransmitMessage gtTransmitMessage) {

        System.out.println("=============onReceiveMessageData+++++"+new String(gtTransmitMessage.getPayload()));

    }

    @Override
    public void onReceiveOnlineState(Context context, boolean b) {
        System.out.println("=============onReceiveOnlineState");
    }

    @Override
    public void onReceiveCommandResult(Context context, GTCmdMessage gtCmdMessage) {
        System.out.println("=============onReceiveCommandResult");
    }

    @Override
    public void onNotificationMessageArrived(Context context, GTNotificationMessage gtNotificationMessage) {

        System.out.println("=============onNotificationMessageArrived");

        System.out.println("==========="+gtNotificationMessage.getContent()+"||||"+gtNotificationMessage.getTitle());
    }

    @Override
    public void onNotificationMessageClicked(Context context, GTNotificationMessage gtNotificationMessage) {
        System.out.println("=============onNotificationMessageClicked");
    }
}
